<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <style type="text/css">

#div1{width: 200px;height: 200px;background: black;position: absolute;left: 200px;top:250px;}

#div2{width: 200px;height: 200px;background: green;position: absolute;left: 300px;top:350px;}

    </style>
</head>
<body style="height:2000px;">
<div id='div1'></div>
<div id='div2'></div>
<script type="text/javascript">
	
	var oldDivOneTop = div1.offsetTop;
	var oldDivTwoTop = div2.offsetTop;
	onscroll = function(){
		var iScroll = document.body.scrollTop || document.documentElement.scrollTop;
		div1.style.top = oldDivOneTop + (iScroll*0.3)+'px';
		div2.style.top = oldDivTwoTop +(iScroll*0.55)+'px';
	}

</script>
</body>
</html>